#include <stdio.h>
#include <string.h>

int main()
{
    FILE* fp = fopen("test.txt","r");
    if(!fp)
    {
        perror("fopen failed");
        return 1;
    }
    const char* str = "i am yui~\n";
    char s[1024];
    int len = strlen(str);
    while(1)
    {

        ssize_t n  = fread(s,1,len,fp);
        if(n == len)
        {
            s[len] = 0;
            printf("%s",s);
        }

        if(feof(fp))
            break;
    }
        
    return 0;
}
